package asruby.lang
{
import asruby.runtime.IRubyObject;
import asruby.runtime.buildin.Variable;
	
public class ConstantTableEntry implements Variable {
    private var hash:int;
    private var name:String;
    private var value:IRubyObject;
    private var next:ConstantTableEntry;

    // constant table entry values are final; if a constant is redefined, the
    // entry will be removed and replaced with a new entry.
    public function ConstantTableEntry(
             hash:int,
             name:String,
             value:IRubyObject,
             next:ConstantTableEntry) {
        this.hash = hash;
        this.name = name;
        this.value = value;
        this.next = next;
    }
    
    public function  getName(): String {
        return name;
    }
    
    public function  getValue(): Object {
        return value;
    }
    public final function  isClassVariable(): Boolean {
        return false;
    }
    
    public final function  isConstant(): Boolean {
        return true;
    }
    
    public final function  isInstanceVariable(): Boolean {
        return false;
    }

    public final function  isRubyVariable(): Boolean {
        return true;
    }
}
}